# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Eivind Uggedal <eu@eju.no>
# Maintainer:
pkgname=tarsnap
pkgver=1.0.39
pkgrel=4
pkgdesc="Online backups for the truly paranoid"
url="https://www.tarsnap.com/"
arch="x86_64 x86 ppc64le aarch64"
license="custom"
makedepends="e2fsprogs-dev zlib-dev openssl-dev"
subpackages="$pkgname-doc"
source="https://www.tarsnap.com/download/$pkgname-autoconf-$pkgver.tgz"
builddir="$srcdir"/$pkgname-autoconf-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
}

sha512sums="dec8a72144a3a7fd42b006933c904b812894ca9fe2c57ecc4fbba817b9b49c8f15517530a00b0c3a9897e3182b4d9aee525334537806a9c4f7308086678fa2b4  tarsnap-autoconf-1.0.39.tgz"
